﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SGArchiveSystem7xDB.Linq
{
    /// <summary>
    /// 借阅人
    /// </summary>
    public class T_BuserDal
    {
        static SGArchiveSystem7xEntities conn;
        /// <summary>
        /// 添加借阅人
        /// </summary>
        /// <param name="en"></param>
        /// <returns></returns>
        public static int Add_Buser(T_BUser en)
        {
            try
            {
                conn = new SGArchiveSystem7xEntities();
                conn.T_BUser.Add(en);
                conn.SaveChanges();
                return en.BU_ID;
            }
            catch { return -1; }
        }
    }
}
